<?php
/**
 * Created by PhpStorm.
 * User: xpz
 * Date: 2023/7/27
 * Time: 7:54
 */

namespace app\common\model;
use think\Model;

class ArticleContent extends Model
{
    public function getContentAttr($value, $data){
        if(!empty($data['content'])){
            $imgDomain = getImgDomain().'/uploads/';
            return str_replace(['/uploads/'],[$imgDomain],$data['content']);
        } else {
            return '';
        }
    }
}